/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

/**
 * 驿站站点管理 => 驿站短信通知率监控
 */
import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Tabs } from 'antd';
import SmsMonitorInn from '@/components/_pages/yz/smsMonitor/SmsMonitorInn';
import SmsMonitorComplaint from '@/components/_pages/yz/smsMonitor/SmsMonitorComplaint';

const SmsMonitor: React.FC = () => {
  const [activeKey, setActiveKey] = useState<string>('1');
  const tabList = [
    {
      tab: '未达标驿站',
      key: '1',
      children: <SmsMonitorInn activeKey={activeKey} />,
    },
    {
      tab: '全部驿站',
      key: '2',
      children: <SmsMonitorInn activeKey={activeKey} />,
    },
    {
      tab: '投诉单号',
      key: '3',
      children: <SmsMonitorComplaint />,
    },
  ];

  return (
    <PageContainer style={{ background: '#fff', paddingTop: 15 }}>
      <Tabs type='card' onChange={setActiveKey} activeKey={activeKey}>
        {tabList.map((item) => (
          <Tabs.TabPane tab={item.tab} key={item.key}>
            {item.children}
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};

export default SmsMonitor;
